package com.ama.service.impl;

import com.ama.dao.EstateDao;
import com.ama.pojo.Estate;
import com.ama.service.EstateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EstateServiceImpl implements EstateService {
    @Autowired
    private EstateDao estateDao;
    @Override
    public int deleteById(Long estateId) {
        return estateDao.deleteById(estateId);
    }

    @Override
    public int insertEstate(Estate estate) {
        return estateDao.insertEstate(estate);
    }

    @Override
    public int insertSelective(Estate estate) {
        return estateDao.insertSelective(estate);
    }

    @Override
    public Estate selectById(Long estateId) {
        return estateDao.selectById(estateId);
    }

    @Override
    public List<Estate> selectAll() {
        return estateDao.selectAll();
    }

    @Override
    public int updateByIdSelective(Estate estate) {
        return estateDao.updateByPrimaryKeySelective(estate);
    }

    @Override
    public int updateById(Estate estate) {
        return estateDao.updateById(estate);
    }
}
